package com.brioal.commonjava;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

/**
 * email:brioal@foxmail.com
 * github:https://github.com/Brioal
 * Created by brioa on 2018/10/11.
 */
@Repository
public interface FileRepository extends JpaRepository<FileBean,Integer> {

    /**
     * 获取所有的临时文件
     * @param temp
     * @param pageable
     * @return
     */
    Page<FileBean> findAllByTempEqualsOrderByCreateTimeDesc(boolean temp, Pageable pageable);
}
